from typing import Literal
from pydantic import BaseModel, Field, field_validator


class ASRResponse(BaseModel):
    """语音识别响应模型"""
    text: str 



class SuccessResponse(BaseModel):
    """成功响应模型"""
    code: int = Field(default=200, description="状态码")
    message: str = Field(default="success", description="消息")
    data: ASRResponse = Field(description="数据")

class ErrorResponse(BaseModel):
    """错误响应模型"""
    code: int = Field(default=500, description="状态码")
    message: str = Field(default="error", description="消息")
    detail: str = Field(default="", description="详细信息")